<template>
	<view>

		<view class="addrs">
			<view class="item">
				<view class="info">
					<view class="left">联系人：</view>
					<view class="right">
						<uni-easyinput :clearable="false" v-model="baseFormData.name" :inputBorder="false"
							placeholderStyle="font-size:18px" primaryColor="#f2f2f2" placeholder="请输入姓名" />
					</view>
				</view>

			</view>
			<view style="width: 100%; height: 1rpx; margin: 10rpx 0rpx; background-color: #ececec;"></view>
			<view class="item">
				<view class="info">
					<view class="left">性别：</view>
					<view class="right">
						<radio value="0" color="#c0c4cc" :checked="baseFormData.sex == 0" @click="changeSex(0)">女
						</radio>
						<radio value="1" color="#c0c4cc" :checked="baseFormData.sex == 1" @click="changeSex(1)">男
						</radio>
					</view>
				</view>

			</view>
			<view style="width: 100%; height: 1rpx; margin: 10rpx 0rpx; background-color: #ececec;"></view>
			<view class="item">
				<view class="info">
					<view class="left">手机号：</view>
					<view class="right">
						<uni-easyinput :clearable="false" v-model="baseFormData.phone" :inputBorder="false"
							placeholderStyle="font-size:18px" primaryColor="#f2f2f2" placeholder="请输入手机号" />
					</view>
				</view>

			</view>
			<view style="width: 100%; height: 1rpx; margin: 10rpx 0rpx; background-color: #ececec;"></view>
			<view class="item">
				<view class="info">
					<view class="left">收货地址：</view>
					<view class="right">
						<uni-easyinput :clearable="false" v-model="baseFormData.addr" :inputBorder="false"
							placeholderStyle="font-size:18px" primaryColor="#f2f2f2" placeholder="请输入收货地址" />
					</view>
				</view>

			</view>
			<view style="width: 100%; height: 1rpx; margin: 10rpx 0rpx; background-color: #ececec;"></view>
			<view class="item">
				<view class="info">
					<view class="left">门牌号：</view>
					<view class="right">
						<uni-easyinput :clearable="false" v-model="baseFormData.code" :inputBorder="false"
							placeholderStyle="font-size:18px" primaryColor="#f2f2f2" placeholder="请输入门牌号" />
					</view>
				</view>

			</view>
			<view style="width: 100%; height: 1rpx; margin: 10rpx 0rpx; background-color: #ececec;"></view>
			<view class="item">
				<view class="info">
					<!-- <view class="left"></view> -->
					<view class="right">
						<radio class="df" value="1" color="#c0c4cc" :checked="baseFormData.default == 1"
							@click="changeDf">设置为默认地址
						</radio>
					</view>
				</view>

			</view>
			<view style="width: 100%; margin: 10rpx 0rpx; "></view>
		</view>
		<view class="btn" @click="submit">保存</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				baseFormData: {
					name: "老王",
					sex: 1,
					phone: 19327528015,
					addr: "深圳市宝安区",
					code: "16栋三楼A11"
				}
			}
		},
		methods: {
			submit(){
				uni.navigateBack()
			},
			changeSex(sex) {
				this.baseFormData.sex = sex
			},
			changeDf() {
				this.baseFormData.default = !this.baseFormData.default;
			}
		}
	}
</script>
<style>
	page {
		background-color: #f2f2f2;
	}
</style>
<style scoped lang="less">
	.btn {
		font-size: 20px;
		width: 90%;
		background-color: #f9bf36;
		color: #fff;
		border-radius: 10rpx;
		text-align: center;
		line-height: 100rpx;
		height: 100rpx;
		margin: 0px auto;
		margin-top: 100rpx;
	}

	.addrs {
		padding: 5rpx 20rpx;
		background-color: #fff;
		margin: 20rpx 0rpx;

		.item {
			padding: 10rpx 20rpx;

			.info {
				display: flex;
				justify-content: space-between;
				align-items: center;

				.right {
					flex-grow: 1;
					font-size: 18px;

					/deep/.uni-easyinput__content-input {
						font-size: 18px;
					}

					.df {
						margin: 0px !important;
					}

					radio {
						margin: 0px 20rpx;
					}
				}

				.left {
					font-size: 18px;
					width: 170rpx;
				}
			}
		}
	}
</style>